package cate.common.table.trademall.treasuresupply;

import cate.common.table.ERow;
import cate.common.table.XSSFRowWrap;
import cate.common.table.d.GD;
import easy.java.dev.note.NoteClass;
import easy.java.dev.note.NoteField;

@NoteClass(value = "交易坊-礼包补给商品配置 Row")
public class TreasureSupplyItemRow extends ERow {
    @NoteField(value = "主表ID")
    public int supplyId;
    @NoteField(value = "消耗类型", detail = "0免费 1消耗资源物品 2直购")
    public int costType;
    @NoteField(value = "直购价格")
    public int costRmb;
    @NoteField(value = "购买消耗")
    public String costStr;
    @NoteField(value = "重置类型", detail = "0从不重置 1日重置 2周重置 3月重置")
    public int resetType;
    @NoteField(value = "限购数量", detail = "0不限购")
    public int buyLimit;
    @NoteField(value = "VIP限购")
    public int vipLimit;
    @NoteField(value = "奖励物品")
    public String rewardStr;

    @Override
    public void parse(XSSFRowWrap xrw) {
        super.parse(xrw);
        id = xrw.getInteger("ID");
        supplyId = xrw.getInteger("主表ID", 0);
        costType = xrw.getInteger("消耗类型", -1);
        costRmb = xrw.getInteger("直购价格", 0);
        costStr = xrw.getString("购买消耗", "");
        resetType = xrw.getInteger("重置类型", 0);
        buyLimit = xrw.getInteger("限购数量", 0);
        vipLimit = xrw.getInteger("VIP限购", 0);
        rewardStr = xrw.getString("奖励物品");
    }
}
